/* flex */
.flx {
  display: flex;
}
.flx-1 {
  flex: 1;
}
.flx-center {
  display: flex;
  align-items: center;
  justify-content: center;
}
.flx-justify-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.flx-justify-around {
  display: flex;
  align-items: center;
  justify-content: space-around;
}
.flx-top-between {
  display: flex;
  justify-content: space-between;
}
.flx-justify-end {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
.flx-align-center {
  display: flex;
  align-items: center;
}
.flx-align-end {
  display: flex;
  align-items: flex-end;
}
.flx-column {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.font-12 {
  font-size: 12px;
}

.pointer {
  cursor: pointer;
}

/* clearfix */
.clearfix::after {
  display: block;
  height: 0;
  overflow: hidden;
  clear: both;
  content: "";
}

/* 文字单行省略号 */
.sle {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 文字多行省略号 */
.mle {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

/* 文字多了自动換行 */
.break-word {
  word-break: break-all;
  word-wrap: break-word;
}

/* fade-transform */
.fade-transform-leave-active,
.fade-transform-enter-active {
  transition: all 0.2s;
}
.fade-transform-enter-from {
  opacity: 0;
  transition: all 0.2s;
  transform: translateX(-30px);
}
.fade-transform-leave-to {
  opacity: 0;
  transition: all 0.2s;
  transform: translateX(30px);
}

/* breadcrumb-transform */
.breadcrumb-enter-active {
  transition: all 0.2s;
}
.breadcrumb-enter-from,
.breadcrumb-leave-active {
  opacity: 0;
  transform: translateX(10px);
}

/* scroll bar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-thumb {
  background-color: var(--el-border-color-darker);
  border-radius: 20px;
}

/* nprogress */
#nprogress .bar {
  background: var(--el-color-primary) !important;
}
#nprogress .spinner-icon {
  border-top-color: var(--el-color-primary) !important;
  border-left-color: var(--el-color-primary) !important;
}
#nprogress .peg {
  box-shadow:
    0 0 10px var(--el-color-primary),
    0 0 5px var(--el-color-primary) !important;
}

/* 外边距、内边距全局样式 */
@for $i from 0 through 100 {
  .mt#{$i} {
    margin-top: #{$i}px !important;
  }
  .mr#{$i} {
    margin-right: #{$i}px !important;
  }
  .mb#{$i} {
    margin-bottom: #{$i}px !important;
  }
  .ml#{$i} {
    margin-left: #{$i}px !important;
  }
  .pt#{$i} {
    padding-top: #{$i}px !important;
  }
  .pr#{$i} {
    padding-right: #{$i}px !important;
  }
  .pb#{$i} {
    padding-bottom: #{$i}px !important;
  }
  .pl#{$i} {
    padding-left: #{$i}px !important;
  }
}
.text-primary {
  color: var(--el-color-primary) !important;
}
.text-warning {
  color: #ff803d;
}
.bg-primary {
  background: var(--el-color-primary) !important;
}
.inline-block {
  display: inline-block;
}

.ml-8 {
  margin-left: 8px;
}
.mr-8 {
  margin-right: 8px;
}

.ml-10 {
  margin-left: 10px;
}
.ml-20 {
  margin-left: 20px;
}
.mr-10 {
  margin-right: 10px;
}
.mr-20 {
  margin-right: 20px;
}
.mt-10 {
  margin-top: 10px;
}
.mt-20 {
  margin-top: 10px;
}
.mb-10 {
  margin-bottom: 10px;
}
.mb-20 {
  margin-bottom: 20px !important;
}

.pt-10 {
  padding-top: 10px;
}
.pb-10 {
  padding-bottom: 10px;
}

.mt-12 {
  margin-top: 12px;
}
.mb-12 {
  margin-bottom: 12px;
}
.ml-12 {
  margin-left: 12px;
}
.mr-12 {
  margin-right: 12px;
}

.text-color-4 {
  color: rgba(0, 0, 0, 0.4);
}
.text-color-6 {
  color: rgba(0, 0, 0, 0.6);
}
.text-color-8 {
  color: rgba(0, 0, 0, 0.8);
}
.w-100 {
  width: 100% !important;
}
.h-100 {
  height: 100% !important;
}
.form-inline-wrap {
  width: 100% !important;
  display: flex;
  flex-wrap: wrap;
  .el-form-item {
    width: calc(50% - 16px);

    &:nth-child(even) {
      margin-right: 0;
    }
  }

  .el-input {
    width: 100% !important;
  }

  .w-100 {
    width: 100% !important;
    margin-right: 0 !important;

    .el-input {
      width: 100%;
    }
  }
}

.p-title {
  height: 22px;
  line-height: 22px;
  display: flex;
  align-items: center;

  &::before {
    content: "";
    display: inline-block;
    width: 4px;
    height: 22px;
    background: var(--el-color-primary);
    margin-right: 10px;
  }
}

.el-drawer .el-drawer__header {
  border-bottom: none !important;
}

ul,
ol,
li {
  list-style: none;
  margin: 0;
  padding: 0;
}

.text-grey {
  color: #909399;
}
.text-green {
  color: #30cb82;
}
.text-red {
  color: #ff0000;
}
.table-body-min-height {
  height: 160px;
}

.approval-process {
  .el-step.is-horizontal {
    position: relative;
  }
  .is-finish .el-step__icon {
    color: #fff;
    background: var(--el-color-primary);
  }
  .el-step__head.is-process,
  .el-step__title.is-process {
    color: var(--el-text-color-placeholder);
    border-color: var(--el-text-color-placeholder);
  }
  .el-step__main {
    display: inline-block;
    position: absolute;
    top: -8px;
    background: #fff;
    padding: 0 12px;
    left: 24px;
    font-weight: bold;
  }
  .el-step:last-of-type.is-flex {
    flex-basis: 50% !important;
  }
  .el-step.is-horizontal .el-step__line {
    right: 12px;
  }
}

.el-tabs-no-bottom .el-tabs__header {
  margin-bottom: 0;
}

.table-input {
  width: 100% !important;
  height: 24px;

  .el-input-number__decrease,
  .el-input-number__increase {
    padding: 0 0px;
    width: 20px;
  }
  .el-input__wrapper {
    padding: 0 10px !important;
  }

  .el-select__wrapper {
    min-height: 24px;
  }
}

.modal-mask {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;

  .modal-content {
    padding: 11px 20px 20px 20px;
    box-sizing: border-box;
    box-shadow:
      0px 16px 48px 16px rgba(0, 0, 0, 0.08),
      0px 12px 32px 0px rgba(0, 0, 0, 0.12),
      0px 8px 16px -8px rgba(0, 0, 0, 0.16);
    background: #ffffff;
    border-radius: 4px;

    .title-wrap {
      height: 26px;
      line-height: 26px;

      .title {
        font-size: 18px;
        font-weight: 700;
      }
    }
  }
}
.modal-content {
  width: 600px;
  height: 530px;
}
